import 'package:get/get.dart';
import 'package:music_app/modules/daily_recommend/index.dart';
import 'package:music_app/modules/launch/index.dart';
import 'package:music_app/modules/login/index.dart';
import 'package:music_app/modules/main_tab/main_tab_binding.dart';
import 'package:music_app/modules/main_tab/main_tab_view.dart';
import 'package:music_app/modules/playlist/index.dart';
import 'package:music_app/modules/register/index.dart';
import 'package:music_app/modules/search/index.dart';
import 'package:music_app/player/full_player.dart';
import 'package:music_app/modules/my/index.dart';

class AppPages {
  static final routes = [
    GetPage(
      name: '/main',
      page: () => const MainTabView(),
      binding: MainTabBinding(), // 管理依赖注入
    ),
    GetPage(
      name: '/login',
      page: () => const LoginView(),
    ),
    GetPage(
      name: '/register',
      page: () => const RegisterView(),
    ),
    GetPage(
      name: '/launch',
      page: () => const LaunchView(),
    ),
    GetPage(
      name: '/playlist',
      page: () => const PlayListView(),
      // 定义动画类型
      transition: Transition.rightToLeft,
      // 定义动画时长
      transitionDuration: const Duration(milliseconds: 100),
    ),
    GetPage(
      name: '/search',
      page: () => const SearchView(),
      // 定义动画类型
      transition: Transition.rightToLeft,
      // 定义动画时长
      transitionDuration: const Duration(milliseconds: 100),
    ),
    GetPage(
      name: '/full-player',
      page: () => const FullPlayer(),
      // 定义动画类型
      transition: Transition.downToUp,
      // 定义动画时长
      transitionDuration: const Duration(milliseconds: 100),
      fullscreenDialog: true, // 可选，使页面表现像一个 dialog
    ),
    GetPage(
      name: '/recommend-day',
      page: () => const DailyRecommendView(),
      // 定义动画类型
      transition: Transition.rightToLeft,
      // 定义动画时长
      transitionDuration: const Duration(milliseconds: 100),
    ),
    GetPage(
      name: '/my',
      page: () => const MyView(),
      // 定义动画类型
      transition: Transition.rightToLeft,
      // 定义动画时长
      transitionDuration: const Duration(milliseconds: 100),
    )
  ];
}
